<template>
  <div>
    <h1>房源列表</h1>
    <hr>
    <h3>use ssr</h3>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column prop="Type" label="类型"></el-table-column>
      <el-table-column prop="Content" label="内容"></el-table-column>
      <el-table-column prop="PublishTime" label="时间"></el-table-column>
    </el-table>
  </div>
</template>

<script>
import axios from "axios";
export default {
  head() {
    return {
      title: "order",
      meta: [
        {
          hid: "order hid",
          name: "order name",
          content: "My order description"
        }
      ]
    };
  },
  asyncData({ params }) {
    // axios.defaults.baseURL = "https://mock.yjyz.com/mock";
    // axios.defaults.headers.common['Authorization'] = "Basic dWp1ejpmb2xsb3d1cA=="; 
    // axios.defaults.headers.common['Content-Type'] = "application/x-www-form-urlencoded"; 

    // return axios
    //   .get("/5c9209b7ca98815ddec93266/api_copy/getHouseList", {headers:{"Access-Control-Allow-Origin":"*"}})
    //   .then(response => {
    //     return { tableData: response.data["data"]["list"] };
    //   })
    //   .catch(function(error) {
    //     console.log(error);
    //   });
  },
  data() {
    return {
      tableData: []
    };
  },
  created() {
    // console.log("获取列表");
  },
  methods: {}
};
</script>

<style scoped>
</style>